package com.sl.crawler.robot.getUrl;


import com.sl.crawler.robot.request.Request;

import java.util.concurrent.LinkedBlockingDeque;


public class UrlQueue {

    private LinkedBlockingDeque<Request> queue = new LinkedBlockingDeque<>();

    public void pushFirst(Request request) {
        queue.addFirst(request);
    }

    public void push(Request request) {
        queue.add(request);
    }

    public Request poll() {
        return queue.poll();
    }

    public Request pollLast() {
        return queue.pollLast();
    }

}
